package edu.hitsz.aircraft;

import edu.hitsz.application.ImageManager;
import edu.hitsz.application.Main;
import edu.hitsz.prop.AbstractProp;
import edu.hitsz.prop.BombSubscriber;

import java.util.LinkedList;
import java.util.List;

/**
 * @author CsCN
 */
public abstract class AbstractEnemy extends AbstractAircraft implements BombSubscriber {
    public AbstractEnemy(int locationX, int locationY, int speedX, int speedY, int hp,
                         int shootNum, int power, int direction) {
        super(locationX, locationY, speedX, speedY, hp, shootNum, power, direction);
    }

    /**
     * 敌机死亡并产生掉落物
     *
     * @return 掉落物数组, 没有返回空数组
     */
    public List<AbstractProp> enemyVanish() {
        this.vanish();//防止忘记写vanish, 实际上和抽象方法差不多
        return new LinkedList<>();
    }

    @Override
    public void update() {
        // 不掉道具
        this.vanish();
    }
}
